/*
 * @Author: Li Zengkun
 * @Date: 2022-09-26 19:31:53
 * @LastEditors: Li Zengkun
 * @LastEditTime: 2022-09-26 19:35:54
 * @Description: 
 */
import axios from "axios";

// 取消收藏的商品
const cancelStar = (id, params) => axios.put(`/collection/${id}`, { params })

// 添加商品至我的收藏
const star = (data) => axios.post('/collection', data)

// 获取所有收藏的商品
const getStar = (params) => axios.get('/collection', { params })

export default {
    cancelStar,
    star,
    getStar
}